
from nfp_function import Nester
from tools import input_utls
from settings import BIN_LENGTH, BIN_WIDTH
import time
import pandas as pd
import numpy as np

# cProfile.run("nesting(filepath_test2, 'L0002')")
start = time.time()
#
#filepath = "./data/data1.csv"
#data_df = pd.read_csv(filepath)

filepath = "./data/标签数据2.xlsx"
data_df = pd.read_excel(filepath)

shapes = input_utls.get_shapes( data_df )

n = Nester()
n.set_segments(shapes)
n.set_container( BIN_LENGTH, BIN_WIDTH)
n.run()

end = time.time()

print('Running time: %s Seconds' % (end - start))
print('Running time: %s Minus' % ((end - start) / 60))










